home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperTalkHelp.cpt / HyperTalk Tutorial Sampler 1.1 / card_3625.txt < prev    next >
Text File  |  1989-02-26  |  5KB  |  94 lines

  1. -- card: 3625 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2619
  5. -- name: 
  6. ----- HyperTalk script -----
  7.  
  8.  
  9.  
  10.  
  11.  
  12. -- part 2 (button)
  13. -- low flags: 00
  14. -- high flags: 0000
  15. -- rect: left=43 top=27 right=63 bottom=77
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 32462 / 32462
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: New Button
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   play "Boing" tempo 120 a
  27.   push card
  28.   go to card id 39356 of stack "Help"
  29. end mouseUp
  30.  
  31.  
  32.  
  33. -- part contents for background part 9
  34. ----- text -----
  35. on mouseUp
  36.   play "boing"
  37. end mouseUp
  38.  
  39.  
  40.  
  41. -- part contents for background part 13
  42. ----- text -----
  43. on mouseUp
  44.   play "boing"
  45. end mouseUp
  46.  
  47.  
  48.  
  49. -- part contents for background part 10
  50. ----- text -----
  51. These tutorial cards provide an easy way to learn script writing in HyperCard.  It is not a substitute for the HyperCard Manual or Help, but an aid in learning and using the HyperTalk‚Ñ¢ language.  
  52.  
  53. The tutorial assumes that you know how to use a Macintosh, get around in HyperCard, create buttons and fields, and use the Help stack. 
  54.  
  55. Before starting the tutorial, you should go through the 
  56. "Introduction to HyperTalk" section in the HyperCard help stack.  If you'd like to now, click on the "?" in the upper left corner of the screen.  When you are done, open this stack again or use the "back" key (~) to return here.  The ? button appears on each card and is linked to the appropriate help card in the HyperTalk Help stack.The ? to the right of the Script Window takes you to a HELP CARD that explains the different parts of these tutorial cards.
  57.  
  58. Each card in this tutorial presents a lesson on a particular command in the HyperTalk language. To use the cards:
  59.  
  60. 1)   Read the explaination of what the command does.  
  61. 2)   Study the example in the Script Window.
  62. 3)   Click on the Test Button to see the example work.
  63. 4)   Try the exercise by making changes in the Script         
  64.        Window, clicking on the "Send To Button" button, 
  65.        and clicking on the Test Button again.  Be sure to 
  66.        click "Send To Button" after each change you make 
  67.        in the Script Window.
  68.  
  69. Let's try this out.  The script below makes the "boing" sound when the Test Button is clicked.  Try the Test Button now.
  70.  
  71. Now let's edit the script and add the letters "e f g" after the last quote in the second line.  Be sure to put one space between each letter.  It should look like this: 
  72.        play "boing" e f g
  73.  
  74. Click "Send To Button" and then the Test Button.
  75.  
  76. Pretty easy, eh?  You're already a programmer.  These cards give you little workshops to play with the commands.  After you go through each exercise, try to think of a different way to use the commands.  Experiment, learn, play, and have fun.
  77.  
  78. Here are some hints in case you get stuck:
  79.  
  80. RESET CARD:  The Reset Card button in the upper right hand corner will put the original tutorial script back into the Script Window and the Test Button.  Use it if you accidentally delete a line or really get stuck.  The card automatically resets when you enter it. ( The "ding, ding" is the sound of the card reseting itself.)  If you want to save changes you make to a script, select all the lines and copy them to the clipboard.
  81.  
  82. HELP COMMAND or ?:  The ? button in the upper right corner will take you to the card in the Help stack that explains the HyperTalk command discussed in the lesson.  To get back to the lesson, select "Back" from the "Go" menu (command ~) or use the ~ key, or open this stack.  Whenever you leave a card (except to go to the HELP CARD), changes to the script in the Script Window will be lost.  If you want to save them, select and copy them to the clipboard, them paste them back when you return.
  83.  
  84. HELP CARD:  The ? to the right of the Script Window takes you to a HELP CARD that explains the different buttons and fields on these tutorial cards.  When you return from HELP CARD, the card you were working on is NOT reset.
  85.  
  86. RESULT: The Result field in the left lower part of the card is used in some lessons to put the result of calculations or inquiries.  You can also type into the Result field.
  87.  
  88. ERROR MESSAGES: If you get an error message and a  dialog box when you click on the Test Button, HyperCard is telling you there is something wrong with the script.  Click the cancel button and try to fix it in the Script Window.
  89.  
  90. That's it.  Now click the arrow pointing to the right to go forward to the next card.  Happy Scripting!!
  91.  
  92. -- part contents for background part 6
  93. ----- text -----
  94. How to Use the Tutorial